From 75450f0aed6502d9e9987ed43f198814e78cb896 Mon Sep 17 00:00:00 2001 From: "mafetter@fleming.research" Date: Mon, 24 Jan 2005 16:54:09 +0000 Subject: [PATCH] bitkeeper revision 1.1159.212.31 (41f52831-7xkHV9BTxL0wcBF2Ad-aQ) Added a minor amount of hypercall argument validation to do_boot_vcpu() Signed-off-by: michael.fetterman@cl.cam.ac.uk --- xen/common/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 70f8d0060f..8709630cd4 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -305,8 +305,8 @@ long do_boot_vcpu(unsigned long vcpu, full_execution_context_t *ctxt) int rc = 0; full_execution_context_t *c; - if ( d->exec_domain[vcpu] != NULL ) - return EINVAL; + if ( (vcpu >= MAX_VIRT_CPUS) || (d->exec_domain[vcpu] != NULL) ) + return -EINVAL; if ( alloc_exec_domain_struct(d, vcpu) == NULL ) return -ENOMEM; -- 2.30.2